#AUGUST 1, 2022
#REPLICATION FILE FOR "CITY SIZE AND PUBLIC SERVICE ACCESS: EVIDENCE FROM BRAZIL AND INDONESIA"
#PERSPECTIVES ON POLITICS
#ALISON POST AND NICHOLAS KUIPERS

#load packages
library(foreign)
library(dplyr)
library(stargazer)
library(lmtest)
library(multiwayvcov)
library(sandwich)
library(stringr)
library(ggplot2)
library(tidyverse)
library(scales)
library(estimatr)
library(lm.beta)
library(standardize)
library(modelsummary)
library(tableHTML)

rm(list=ls())

#set working direction
setwd("~/Dropbox/Cities project/pk_replication_file")

#load the data
brazil_data <- read.csv("./_3_data/brazil_data.csv")
indonesia_data <- read.csv("./_3_data/indonesia_data.csv")


#Main manuscript figures and tables---------------------------------------------
#Figure 1
source("./_2_code/figure_1.R")

#Figure 2
source("./_2_code/figure_2.R")

#Figure 3
source("./_2_code/figure_3.R")

#Figure 7
source("./_2_code/figure_7.R")

#Appendix figures and tables----------------------------------------------------
#Table A1
source("./_2_code/table_a1.R")

#Table A2
source("./_2_code/table_a2.R")

#Online appendix figures and tables---------------------------------------------
#Table OA I
source("./_2_code/table_oa_i.R")

#Table OA II
source("./_2_code/table_oa_ii.R")

#Table OA III
source("./_2_code/table_oa_iii.R")

#Table OA IV
source("./_2_code/table_oa_iv.R")

#Figure OA I
source("./_2_code/figure_oa_i.R")

#Figure OA II
source("./_2_code/figure_oa_ii.R")

#Figure OA III
source("./_2_code/figure_oa_iii.R")

#Figure OA IV
source("./_2_code/figure_oa_iv.R")

#Figure OA V
source("./_2_code/figure_oa_v.R")

#Figure OA VI
source("./_2_code/figure_oa_vi.R")

#Figure OA VII
source("./_2_code/figure_oa_vii.R")



